home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / batch / dskchk.zip / DSKCHK.DOC < prev   
Text File  |  1991-01-26  |  2KB  |  48 lines

  1.  
  2. ______DSKCHK                                                            Ver. 1.00
  3.  
  4.  
  5. Purpose: Batch file utility to detect existence and functioning of disk
  6.          drive; is there a drive, has it a formatted readable disk & (op-
  7.          tionally) can it be written to?
  8.  
  9. Format:     DSKCHK [d] [/W]
  10.  
  11.          _         d is any legal drive letter; if no drive specified, the default
  12.          drive is tested.
  13.  
  14.          __         /W forces an attempt to write if the disk is readable.
  15.  
  16. Remarks: Result of test is reported in ERRORLEVEL:
  17.  
  18.             0 = No error.  Drive exists and disk can be read.  If /W
  19.                 switch was used, disk can also be written to.
  20.  
  21.             1 = Disk cannot be read.
  22.  
  23.             2 = Disk can be read but not written to.  This report can
  24.                 appear only if /W switch is used.
  25.  
  26.             255 = User has bungled the drive letter (by calling for
  27.                   drive % or some such).
  28.  
  29. Notes:   DskChk tests availability of the disk by executing an INT 25h
  30.          read.  This interrupt does not trip the normal Critical Error
  31.          Handler ("Abort, Retry... ") and returns reasonably speedily.
  32.  
  33.          When /W switch is used, an attempt is made using INT 21h, AH=3Ch.
  34.          If successful, this interrupt creates a 0-byte file ISSUDERE.$$$
  35.          in the root directory, and DskChk then deletes the file.  In case
  36.          of failure, a temporary Critical Error Handler is used to speed
  37.          the return and prevent "Abort, Retry...."  Such a failure produces
  38.          ErrorLevel 2 and normally means means the disk is write-protected,
  39.          but it could also be produced by a full root directory.  A full
  40.          disk wouldn't produce the error.
  41.  
  42.          A word of caution: there are a lot of ways of hooking a disk drive
  43.          to a PC, and some of them won't respond to DskChk correctly.  One
  44.          I know about is MicroSolutions' CompatiCard.
  45.  
  46.  
  47.                                                  R. N. Wisan, January, 1991
  48.                                           37 Clinton St., Oneonta, NY 13820